import http from '../request';

// 获取消息分页
export const getMessageLogPage: any = (params: any) => {
    return http.request({
        url: '/api/messageSendLog/getMessageLogPage',
        method: 'get',
        params: params
    });
};

// 获取未读数量
export const getUnReadMessageCount: any = () => {
    return http.request({
        url: '/api/messageSendLog/getUnReadMessageCount',
        method: 'get'
    });
};

// 设置消息已读
export const setMessageRead: any = (params: any) => {
    return http.request({
        url: '/api/messageSendLog/setMessageRead',
        method: 'post',
        data: params
    });
};

export const deleteMessageLog: any = (params: any) => {
    return http.request({
        url: '/api/messageSendLog/deleteMessageLog',
        method: 'delete',
        params: params
    });
};

// 设置所有消息已读
export const setAllMessageRead: any = () => {
    return http.request({
        url: '/api/messageSendLog/setAllMessageRead',
        method: 'post'
    });
};
